﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Directory.Web
{
    public partial class Admin_Navgator : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string type = null;
            try
            {
                type = Request.QueryString["type"].Trim().ToLower();
            }
            catch { }

            this.HideAllControls();
            switch (type)
            {
                case "itemview":
                    this.ItemView.Visible = true;
                    break;
                case "categoryview":
                    this.CategoryView.Visible = true;
                    break;
                case "messageboard":
                    this.MessageBoard.Visible = true;
                    break;
                case "security":
                    this.Security.Visible = true;
                    break;
                case "sitesettings":
                    this.SiteSettings.Visible = true;
                    break;
                case "manual":
                    this.Manual.Visible = true;
                    break;
                default:
                    this.ItemView.Visible = true;
                    break;
            }
        }

        private void HideAllControls()
        {
            this.ItemView.Visible = false;
            this.CategoryView.Visible = false;
            this.MessageBoard.Visible = false;
            this.Security.Visible = false;
            this.SiteSettings.Visible = false;
            this.Manual.Visible = false;
        }
    }
}